package cn.ilovese.collect.service.report;

import cn.ilovese.collect.vo.ResultVO;
import cn.ilovese.collect.vo.report.*;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Date;
import java.util.List;

public interface ReportService {

    ResultVO<ReportVO> createReport(ReportFormVO reportVO);
    ResultVO<List<ReportWithWorkerNameVO>> getReportList(Integer taskId);
    ResultVO<ReportVO> getReport(Integer reportId);
    ResultVO<ReportWithSimilarityVO> getReportByTaskAndUser(Integer uid, Integer taskid) throws IOException;
    ResultVO<ReportWithSimilarityVO> getReportByReportId(Integer reportId) throws IOException;
    ResultVO<DuplicateVO> getReportDuplication(ReportFormVO reportVO, Integer taskid);
    ResultVO<DuplicateVO> getReportSimilarity(Integer reportId1,Integer reportId2);

    ResultVO<ReportVO> createSubReport(ReportFormVO reportFormVO,Integer fatherid, Integer childid);
    ResultVO<ReportVO> modifyReport(ReportFormVO reportFormVO, Integer reportid);
    ResultVO<DuplicateVO> getReportSimilarityList(Integer reportId);
    ResultVO<List<SubReportInfoVO>> getSubReportList(Integer reportId);

    ResultVO<List<HistoryReportVO>> getHistoryReportVersion(Integer reportId);
    ResultVO<ReportVO> postNewVersionReport(ReportFormVO reportFormVO, Integer oldReportId);

    ResultVO<ReportVO> submitCollaborationTaskReport(ReportFormVO report);
    ResultVO<ReportWithSimilarityVO> getCollaborationTaskReportByReportid(Integer reportId) throws IOException;

    ResultVO<Integer> getReportRate(Integer reportid);


//    Integer getActiveness(Integer interval, Integer userId);
//    Date lastReportSubmit(Integer userId);
//    Double getPlagiarismScore(Integer userId);
}
